from chapter5.regular_test.re_test_patterns import test_patterns

if __name__ == '__main__':
    text = "abbaaaaabbbbba"
    patterns = [
        (r"a(ab)", "字符 a 后面紧跟着字符 ab"),
        (r"a(a*b*)", "字符 a 后面紧跟着 0 个及其以上的字符 a，再紧跟着 0 个及其以上的字符b"),
        (r"a(ab)*", "字符 a 后面紧跟着 0 个及其以上的串 ab "),
        (r"a(ab)+", "字符 a 后面紧跟着 1 个及其以上的串 ab ")
    ]
    test_patterns(text=text, patterns=patterns)